import {CHANGE_LOGIN_STATUS, GET_CAPTCHA, LOGIN, LOGOUT} from "./const";

export const loginAction = (payload) => ({
  type: CHANGE_LOGIN_STATUS,
  payload
});

export const logoutAction = () => ({
  type: CHANGE_LOGIN_STATUS,
  payload: {
    status: false,
    currentAuthority: 'guest',
  },
});

export const loginSagaAction = (payload) => ({
  type: LOGIN,
  payload,
});

export const logoutSagaAction = () => ({
  type: LOGOUT,
});

export const getCaptchaSagaAction = (payload) => ({
  type: GET_CAPTCHA,
  payload,
});
